------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/wesleyblundell/Dropbox/Wes_Supplemental_NEI/JAERE_Replication/Replication_package/log/Table_5_6_A12_A13.log
  log type:  text
 opened on:  17 May 2024, 08:06:15

. use "$rootpath/processed_data/Estimation_HPV_Subset.dta", clear

. gen epafe=year*100+epa_region

. forval i=2/10 {
  2.         gen region_trend`i'=0
  3.         replace region_trend`i'=year if epa_region==`i'
  4.         
. }
(270 real changes made)
(510 real changes made)
(595 real changes made)
(2,170 real changes made)
(1,879 real changes made)
(165 real changes made)
(209 real changes made)
(1,522 real changes made)
(200 real changes made)

. gen obs_num=_n

. sort epafe

. egen test500=nvals(obs_num), by(epafe)

. replace epafe=0 if test500<450
(7,686 real changes made)

. tabulate epafe, gen(epafe_)

      epafe |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      7,686      100.00      100.00
------------+-----------------------------------
      Total |      7,686      100.00

. reghdfe state_fine_rate treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 713 iterations)

HDFE Linear regression                            Number of obs   =      7,686
Absorbing 3 HDFE groups                           F(   1,   1758) =       1.31
Statistics robust to heteroskedasticity           Prob > F        =     0.2531
                                                  R-squared       =     0.3420
                                                  Adj R-squared   =     0.0823
                                                  Within R-sq.    =     0.0007
Number of clusters (frsnumber) =      1,759       Root MSE        = 20775.2104

                          (Std. Err. adjusted for 1,759 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
state_fine~e |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |   10083.44    8820.43     1.14   0.253    -7216.195    27383.07
       _cons |   903.0129   1583.788     0.57   0.569    -2203.294     4009.32
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1759        1759           0    *|
   epa_region#year |       100           0         100     |
      naics#c.year |       316           0         316    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize fine_rate if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   fine_rate |      7,686    7972.158    58098.13          0    1600000

. reghdfe fine_rate treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 658 iterations)

HDFE Linear regression                            Number of obs   =      7,686
Absorbing 3 HDFE groups                           F(   1,   1758) =       2.95
Statistics robust to heteroskedasticity           Prob > F        =     0.0859
                                                  R-squared       =     0.2496
                                                  Adj R-squared   =    -0.0465
                                                  Within R-sq.    =     0.0004
Number of clusters (frsnumber) =      1,759       Root MSE        = 59434.9063

                          (Std. Err. adjusted for 1,759 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
   fine_rate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |   21289.94    12388.7     1.72   0.086    -3008.204    45588.07
       _cons |   4149.357   2224.504     1.87   0.062    -213.5951    8512.308
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1759        1759           0    *|
   epa_region#year |       100           0         100     |
      naics#c.year |       316           0         316    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize fine_rate if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   fine_rate |      7,686    7972.158    58098.13          0    1600000

. reghdfe state_insp_rate treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 709 iterations)

HDFE Linear regression                            Number of obs   =      7,686
Absorbing 3 HDFE groups                           F(   1,   1758) =       0.61
Statistics robust to heteroskedasticity           Prob > F        =     0.4365
                                                  R-squared       =     0.5302
                                                  Adj R-squared   =     0.3447
                                                  Within R-sq.    =     0.0003
Number of clusters (frsnumber) =      1,759       Root MSE        =     1.5214

                          (Std. Err. adjusted for 1,759 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
state_insp~e |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.4610062   .5922837    -0.78   0.436    -1.622661    .7006482
       _cons |   .6951731   .1063499     6.54   0.000     .4865875    .9037587
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1759        1759           0    *|
   epa_region#year |       100           0         100     |
      naics#c.year |       316           0         316    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize state_insp_rate if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
state_insp~e |      7,686    .6123952    1.879476          0       57.5

. reghdfe insp_rate treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 648 iterations)

HDFE Linear regression                            Number of obs   =      7,686
Absorbing 3 HDFE groups                           F(   1,   1758) =       0.53
Statistics robust to heteroskedasticity           Prob > F        =     0.4646
                                                  R-squared       =     0.5311
                                                  Adj R-squared   =     0.3461
                                                  Within R-sq.    =     0.0002
Number of clusters (frsnumber) =      1,759       Root MSE        =     1.7534

                          (Std. Err. adjusted for 1,759 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
   insp_rate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.4523296   .6184364    -0.73   0.465    -1.665278    .7606186
       _cons |   1.042039   .1110459     9.38   0.000     .8242428    1.259835
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1759        1759           0    *|
   epa_region#year |       100           0         100     |
      naics#c.year |       316           0         316    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize insp_rate if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   insp_rate |      7,686    .9608188    2.168264          0       57.5

. 
. did_multiplegt_dyn insp_rate frsnumber year treatXpost, normalize effects(1) placebo(0) cluster(frsnumber) trends_nonparam(naics)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 | -3.789162   2.303644  -8.304304   .7259796         18         15 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff | -3.789162   2.303644  -8.304304   .7259795         18         15            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. did_multiplegt_dyn fine_rate frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(naics)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 |    7941.2   16502.52  -24403.74   40286.14         18         15 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff |  7941.199   16502.52  -24403.74   40286.14         18         15            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. did_multiplegt_dyn state_insp_rate frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(naics)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 | -2.501489   2.237203  -6.886407    1.88343         18         15 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff | -2.501489   2.237203  -6.886407    1.88343         18         15            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. did_multiplegt_dyn state_fine_rate frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(naics)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 |  9309.213   6219.674  -2881.349   21499.77         18         15 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff |  9309.213   6219.674  -2881.349   21499.77         18         15            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. 
. reghdfe fine_rate treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster state_number)
(MWFE estimator converged in 658 iterations)

HDFE Linear regression                            Number of obs   =      7,686
Absorbing 3 HDFE groups                           F(   1,     45) =       2.12
Statistics robust to heteroskedasticity           Prob > F        =     0.1526
                                                  R-squared       =     0.2496
                                                  Adj R-squared   =    -0.0465
                                                  Within R-sq.    =     0.0004
Number of clusters (state_number) =         46    Root MSE        = 59434.9063

                          (Std. Err. adjusted for 46 clusters in state_number)
------------------------------------------------------------------------------
             |               Robust
   fine_rate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |   21289.94   14632.39     1.45   0.153     -8181.22    50761.09
       _cons |   4149.357   2627.379     1.58   0.121    -1142.457     9441.17
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1759        1759           0    *|
   epa_region#year |       100           0         100     |
      naics#c.year |       316           0         316    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize fine_rate if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   fine_rate |      7,686    7972.158    58098.13          0    1600000

. 
. reghdfe insp_rate treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster state_number)
(MWFE estimator converged in 648 iterations)

HDFE Linear regression                            Number of obs   =      7,686
Absorbing 3 HDFE groups                           F(   1,     45) =       0.21
Statistics robust to heteroskedasticity           Prob > F        =     0.6493
                                                  R-squared       =     0.5311
                                                  Adj R-squared   =     0.3461
                                                  Within R-sq.    =     0.0002
Number of clusters (state_number) =         46    Root MSE        =     1.7534

                          (Std. Err. adjusted for 46 clusters in state_number)
------------------------------------------------------------------------------
             |               Robust
   insp_rate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.4523296   .9880403    -0.46   0.649    -2.442345    1.537686
       _cons |   1.042039   .1774116     5.87   0.000     .6847133    1.399364
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1759        1759           0    *|
   epa_region#year |       100           0         100     |
      naics#c.year |       316           0         316    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize insp_rate if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   insp_rate |      7,686    .9608188    2.168264          0       57.5

. 
. did_multiplegt_dyn insp_rate frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(state_number) trends_nonparam(naics)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 | -3.789162   2.433575   -8.55897   .9806451         18         15 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff | -3.789162   2.433575   -8.55897   .9806451         18         15            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. did_multiplegt_dyn fine_rate frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(state_number) trends_nonparam(naics)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 |    7941.2   11143.11   -13899.3    29781.7         18         15 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff |  7941.199   11143.11   -13899.3    29781.7         18         15            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. use "$rootpath/processed_data/Estimation_HPV_Subset.dta", clear

. rename frsnumber facility_id

. qui tabulate naics, gen(n)

. forvalues i = 1/316 {
  2. qui replace n`i'=n`i'+year - 2010 if n`i'>0
  3. }

. drop n316

. summarize d_treatXpost

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
d_treatXpost |      7,686    .1795591    .0495685  -.2721376   .6031549

. gen add_val=-1*r(min) + 0.001

. gen d_treatXpost2 = d_treatXpost+add_val

. replace d_treatXpost2=0 if d_treatXpost2>0&d_treatXpost2<0.05
(3 real changes made)

. replace d_treatXpost2=1 if d_treatXpost2>1
(0 real changes made)

. foreach val in  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 {
  2. gen temp_val=`val'*0.05
  3. gen temp_val2 = `val'*0.05+0.05
  4. replace  d_treatXpost2=temp_val if d_treatXpost2>temp_val&d_treatXpost2<temp_val2
  5. drop temp_val temp_val2
  6. }
(2 real changes made)
(7 real changes made)
(6 real changes made)
(16 real changes made)
(55 real changes made)
(110 real changes made)
(375 real changes made)
(1,614 real changes made)
(4,777 real changes made)
(485 real changes made)
(141 real changes made)
(56 real changes made)
(15 real changes made)
(17 real changes made)
(3 real changes made)
(2 real changes made)
(2 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. sort facility_id year

. gen G_T=0

. replace G_T=1 if d_treatXpost2>d_treatXpost2[_n-1]&facility_id==facility_id[_n-1]&(year-1==year[_n-1])
(558 real changes made)

. replace G_T=-1 if d_treatXpost2<d_treatXpost2[_n-1]&facility_id==facility_id[_n-1]&(year-1==year[_n-1])
(451 real changes made)

. gen G_TP1=0

. replace G_TP1=G_T[_n+1] if facility_id==facility_id[_n+1]&(year+1==year[_n+1])
(1,009 real changes made)

. //Note the preliminary October 2023 winner is below
. //set seed 99164
. //fuzzydid d_log_damage55  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.85 0.9 0.95 1) breps(200) cluster(facility_id)
. 
. set seed 99164

. //t5 col3
. fuzzydid d_fine_rate  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  7686 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID |  13017.41   18599.84   .6998668   .4840105  -26222.92   47349.49 
        W_TC |  17856.89   54670.43    .326628   .7439493  -103177.2   121256.6 
       W_CIC |  2145.202   49691.56   .0431703   .9655657  -131011.4    59102.9 

. //t6 col3
. set seed 99164

. fuzzydid d_insp_rate  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  7686 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID | -1.043845   .9873752  -1.057191   .2904242  -3.123471   .7729192 
        W_TC | -.8294815   1.511722  -.5486996   .5832116  -4.738412   1.535209 
       W_CIC | -1.537828   1.375369   -1.11812   .2635157  -3.886529   1.775021 

. 
. set seed 99164

. fuzzydid d_fine_rate  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(state_number)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: state_number.  Number of observations:  7686 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID |  13017.41   30840.89   .4220827   .6729646  -46111.42   72485.07 
        W_TC |  17856.89   60419.02   .2955508   .7675731  -114209.5   138208.2 
       W_CIC |  2145.202   45432.16   .0472177   .9623397  -106796.1   66659.11 

. 
. set seed 99164

. fuzzydid d_insp_rate  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(state_number)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: state_number.  Number of observations:  7686 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID | -1.043845   .6503694  -1.605003   .1084932  -2.275387   .4179871 
        W_TC | -.8294815   1.348215  -.6152444   .5383933  -3.100948   1.909819 
       W_CIC | -1.537828    1.30987  -1.174031   .2403825  -3.156112    1.98851 

. 
. set seed 99164

. fuzzydid d_state_fine_rate  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  7686 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID |  3847.182   6578.726   .5847913   .5586881   -9976.77   16925.69 
        W_TC |  10167.77   13865.58   .7333098   .4633695  -21184.53   34486.63 
       W_CIC |  14097.73   15253.35   .9242382   .3553623  -18492.57   41356.68 

. 
. set seed 99164

. fuzzydid d_state_insp_rate  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  7686 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID | -.9155167    .919412  -.9957632   .3193652  -2.716926   .5589094 
        W_TC | -.7853077   1.332335   -.589422   .5555782  -4.434188   1.066273 
       W_CIC | -.3951398    1.19963  -.3293848   .7418649  -3.748872   1.405344 

. 
. ///FRV
> use "$rootpath/processed_data/Estimation_FRV_Subset.dta", clear

. gen epafe=year*100+epa_region

. tabulate epafe, gen(epafe_)

      epafe |      Freq.     Percent        Cum.
------------+-----------------------------------
     201002 |          5        0.13        0.13
     201003 |         21        0.53        0.66
     201004 |         53        1.34        2.00
     201005 |         60        1.52        3.51
     201006 |         30        0.76        4.27
     201008 |         14        0.35        4.62
     201009 |          5        0.13        4.75
     201102 |          4        0.10        4.85
     201103 |         24        0.61        5.46
     201104 |         54        1.36        6.82
     201105 |         78        1.97        8.79
     201106 |         37        0.93        9.72
     201108 |         14        0.35       10.08
     201109 |          6        0.15       10.23
     201202 |          6        0.15       10.38
     201203 |          8        0.20       10.58
     201204 |         46        1.16       11.75
     201205 |         70        1.77       13.51
     201206 |         36        0.91       14.42
     201208 |         11        0.28       14.70
     201209 |          9        0.23       14.93
     201301 |          2        0.05       14.98
     201302 |          2        0.05       15.03
     201304 |         34        0.86       15.89
     201305 |         83        2.10       17.98
     201306 |         40        1.01       18.99
     201308 |          9        0.23       19.22
     201309 |          8        0.20       19.42
     201401 |          7        0.18       19.60
     201402 |          6        0.15       19.75
     201403 |         32        0.81       20.56
     201404 |         63        1.59       22.15
     201405 |        105        2.65       24.80
     201406 |         60        1.52       26.32
     201407 |         10        0.25       26.57
     201408 |         10        0.25       26.82
     201409 |         16        0.40       27.23
     201501 |         17        0.43       27.66
     201502 |          6        0.15       27.81
     201503 |         69        1.74       29.55
     201504 |         87        2.20       31.75
     201505 |        151        3.81       35.56
     201506 |        111        2.80       38.37
     201507 |         16        0.40       38.77
     201508 |          6        0.15       38.92
     201509 |         24        0.61       39.53
     201510 |          6        0.15       39.68
     201601 |         22        0.56       40.24
     201602 |          6        0.15       40.39
     201603 |         63        1.59       41.98
     201604 |        105        2.65       44.63
     201605 |        186        4.70       49.33
     201606 |        139        3.51       52.84
     201607 |         17        0.43       53.27
     201608 |         13        0.33       53.60
     201609 |         16        0.40       54.00
     201610 |         10        0.25       54.26
     201701 |         18        0.45       54.71
     201702 |         17        0.43       55.14
     201703 |         70        1.77       56.91
     201704 |        140        3.54       60.44
     201705 |        188        4.75       65.19
     201706 |        138        3.49       68.68
     201707 |         22        0.56       69.23
     201708 |         11        0.28       69.51
     201709 |         13        0.33       69.84
     201710 |         14        0.35       70.19
     201801 |         19        0.48       70.67
     201802 |         17        0.43       71.10
     201803 |         69        1.74       72.85
     201804 |        133        3.36       76.21
     201805 |        205        5.18       81.38
     201806 |        140        3.54       84.92
     201807 |         15        0.38       85.30
     201808 |         11        0.28       85.58
     201809 |         13        0.33       85.91
     201810 |         14        0.35       86.26
     201901 |         19        0.48       86.74
     201902 |          7        0.18       86.92
     201903 |         67        1.69       88.61
     201904 |        121        3.06       91.66
     201905 |        166        4.19       95.86
     201906 |        111        2.80       98.66
     201907 |         20        0.51       99.17
     201908 |          8        0.20       99.37
     201909 |         10        0.25       99.62
     201910 |         15        0.38      100.00
------------+-----------------------------------
      Total |      3,959      100.00

. reghdfe state_fine_rate22 treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 351 iterations)

HDFE Linear regression                            Number of obs   =      3,959
Absorbing 3 HDFE groups                           F(   1,   1475) =       0.13
Statistics robust to heteroskedasticity           Prob > F        =     0.7157
                                                  R-squared       =     0.5159
                                                  Adj R-squared   =     0.0690
                                                  Within R-sq.    =     0.0001
Number of clusters (frsnumber) =      1,476       Root MSE        =  6471.6136

                          (Std. Err. adjusted for 1,476 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
state_fin~22 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |   1147.145   3149.457     0.36   0.716    -5030.747    7325.037
       _cons |   571.2354   918.5868     0.62   0.534     -1230.64    2373.111
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1476        1476           0    *|
   epa_region#year |        87           0          87     |
      naics#c.year |       337           0         337    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize state_fine_rate22 if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
state_fin~22 |      3,959    905.8176    6707.284          0     205920

. reghdfe fine_rate22 treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 309 iterations)

HDFE Linear regression                            Number of obs   =      3,959
Absorbing 3 HDFE groups                           F(   1,   1475) =       0.27
Statistics robust to heteroskedasticity           Prob > F        =     0.6059
                                                  R-squared       =     0.5062
                                                  Adj R-squared   =     0.0503
                                                  Within R-sq.    =     0.0000
Number of clusters (frsnumber) =      1,476       Root MSE        = 43588.8927

                          (Std. Err. adjusted for 1,476 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
 fine_rate22 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |   2167.655   4200.704     0.52   0.606    -6072.335    10407.64
       _cons |   1672.037   1225.199     1.36   0.173    -731.2803    4075.355
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1476        1476           0    *|
   epa_region#year |        87           0          87     |
      naics#c.year |       337           0         337    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize fine_rate22 if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
 fine_rate22 |      3,959    2304.267    44729.35          0    2700000

. reghdfe fine_rate22 treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster state_number)
(MWFE estimator converged in 309 iterations)

HDFE Linear regression                            Number of obs   =      3,959
Absorbing 3 HDFE groups                           F(   1,     38) =       0.27
Statistics robust to heteroskedasticity           Prob > F        =     0.6081
                                                  R-squared       =     0.5062
                                                  Adj R-squared   =     0.0503
                                                  Within R-sq.    =     0.0000
Number of clusters (state_number) =         39    Root MSE        = 43588.8927

                          (Std. Err. adjusted for 39 clusters in state_number)
------------------------------------------------------------------------------
             |               Robust
 fine_rate22 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |   2167.655   4191.567     0.52   0.608     -6317.73    10653.04
       _cons |   1672.037   1222.534     1.37   0.179    -802.8533    4146.928
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1476        1476           0    *|
   epa_region#year |        87           0          87     |
      naics#c.year |       337           0         337    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize fine_rate22 if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
 fine_rate22 |      3,959    2304.267    44729.35          0    2700000

. generate n3=floor(naics/1000)

. generate n2=floor(naics/10000)

. 
. did_multiplegt_dyn state_fine_rate22 frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(n2)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 |  750.1205   1787.975   -2754.31   4254.551         63         62 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff |  750.1206   1787.975   -2754.31   4254.551         63         62            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. did_multiplegt_dyn fine_rate22 frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(n2)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 |  3003.461   2751.555  -2389.587   8396.508         63         62 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff |  3003.461   2751.555  -2389.586   8396.508         63         62            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. did_multiplegt_dyn fine_rate22 frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(state_number) trends_nonparam(n2)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 |  3003.461   218.4118   2575.374   3431.548         63         62 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff |  3003.461   218.4117   2575.374   3431.548         63         62            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. reghdfe state_insp_rate22 treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 348 iterations)

HDFE Linear regression                            Number of obs   =      3,959
Absorbing 3 HDFE groups                           F(   1,   1475) =       0.25
Statistics robust to heteroskedasticity           Prob > F        =     0.6199
                                                  R-squared       =     0.8128
                                                  Adj R-squared   =     0.6399
                                                  Within R-sq.    =     0.0001
Number of clusters (frsnumber) =      1,476       Root MSE        =     1.6555

                          (Std. Err. adjusted for 1,476 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
state_ins~22 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.4610182   .9293225    -0.50   0.620    -2.283953    1.361916
       _cons |    1.39769   .2710509     5.16   0.000     .8660035    1.929376
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1476        1476           0    *|
   epa_region#year |        87           0          87     |
      naics#c.year |       337           0         337    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize state_insp_rate22 if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
state_ins~22 |      3,959    1.263227    2.758801          0         90

. reghdfe insp_rate22 treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster frsnumber)
(MWFE estimator converged in 413 iterations)

HDFE Linear regression                            Number of obs   =      3,959
Absorbing 3 HDFE groups                           F(   1,   1475) =       0.31
Statistics robust to heteroskedasticity           Prob > F        =     0.5773
                                                  R-squared       =     0.8186
                                                  Adj R-squared   =     0.6512
                                                  Within R-sq.    =     0.0002
Number of clusters (frsnumber) =      1,476       Root MSE        =     1.6922

                          (Std. Err. adjusted for 1,476 clusters in frsnumber)
------------------------------------------------------------------------------
             |               Robust
 insp_rate22 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.5215567   .9355139    -0.56   0.577    -2.356636    1.313523
       _cons |   1.569739   .2728568     5.75   0.000     1.034511    2.104968
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1476        1476           0    *|
   epa_region#year |        87           0          87     |
      naics#c.year |       337           0         337    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize insp_rate22 if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
 insp_rate22 |      3,959    1.417619    2.865012          0         90

. reghdfe insp_rate22 treatXpost, absorb(frsnumber  epa_region#year naics#c.year) vce(cluster state_number)
(MWFE estimator converged in 413 iterations)

HDFE Linear regression                            Number of obs   =      3,959
Absorbing 3 HDFE groups                           F(   1,     38) =       0.20
Statistics robust to heteroskedasticity           Prob > F        =     0.6542
                                                  R-squared       =     0.8186
                                                  Adj R-squared   =     0.6512
                                                  Within R-sq.    =     0.0002
Number of clusters (state_number) =         39    Root MSE        =     1.6922

                          (Std. Err. adjusted for 39 clusters in state_number)
------------------------------------------------------------------------------
             |               Robust
 insp_rate22 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.5215567   1.155249    -0.45   0.654    -2.860235    1.817122
       _cons |   1.569739   .3369457     4.66   0.000     .8876284     2.25185
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------+
       Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------------+---------------------------------------|
         frsnumber |      1476        1476           0    *|
   epa_region#year |        87           0          87     |
      naics#c.year |       337           0         337    ?|
-----------------------------------------------------------+
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation

. summarize insp_rate22 if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
 insp_rate22 |      3,959    1.417619    2.865012          0         90

. 
. did_multiplegt_dyn state_insp_rate22 frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(n2)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 | -3.085545   1.681281  -6.380856   .2097662         63         62 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff | -3.085545   1.681281  -6.380856   .2097661         63         62            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. 
. did_multiplegt_dyn insp_rate22 frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(frsnumber) trends_nonparam(n2)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 | -3.166108    1.69046   -6.47941   .1471941         63         62 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff | -3.166108    1.69046   -6.47941    .147194         63         62            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. 
. did_multiplegt_dyn insp_rate22 frsnumber year treatXpost, normalize   effects(1) placebo(0) cluster(state_number) trends_nonparam(n2)


--------------------------------------------------------------------------------
             Estimation of treatment effects: Event-study effects
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N  Switchers 
-------------+------------------------------------------------------------------
    Effect_1 | -3.166108   1.689609  -6.477743   .1455266         63         62 
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
    Estimation of treatment effects: Average total effect per treatment unit
--------------------------------------------------------------------------------

             |  Estimate         SE      LB CI      UB CI          N     Switch  x Periods 
-------------+-----------------------------------------------------------------------------
  Av_tot_eff | -3.166108   1.689609  -6.477742   .1455265         63         62            
--------------------------------------------------------------------------------


The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).

. 
. use "$rootpath/processed_data/Estimation_FRV_Subset.dta", clear

. rename frsnumber facility_id

. qui tabulate naics, gen(n)

. forvalues i = 1/316 {
  2. qui replace n`i'=n`i'+year - 2010 if n`i'>0
  3. }

. drop n316

. summarize d_treatXpost

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
d_treatXpost |      3,959    .2916651    .0364383  -.0129752   .5963074

. gen add_val=-1*r(min) + 0.001

. gen d_treatXpost2 = d_treatXpost+add_val

. replace d_treatXpost2=0 if d_treatXpost2>0&d_treatXpost2<0.05
(1 real change made)

. replace d_treatXpost2=1 if d_treatXpost2>1
(0 real changes made)

. foreach val in  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 {
  2. gen temp_val=`val'*0.05
  3. gen temp_val2 = `val'*0.05+0.05
  4. replace  d_treatXpost2=temp_val if d_treatXpost2>temp_val&d_treatXpost2<temp_val2
  5. drop temp_val temp_val2
  6. }
(3 real changes made)
(11 real changes made)
(34 real changes made)
(201 real changes made)
(555 real changes made)
(2,858 real changes made)
(225 real changes made)
(48 real changes made)
(17 real changes made)
(2 real changes made)
(2 real changes made)
(2 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

. 
. sort facility_id year

. gen G_T=0

. replace G_T=1 if d_treatXpost2>d_treatXpost2[_n-1]&facility_id==facility_id[_n-1]&(year-1==year[_n-1])
(274 real changes made)

. replace G_T=-1 if d_treatXpost2<d_treatXpost2[_n-1]&facility_id==facility_id[_n-1]&(year-1==year[_n-1])
(196 real changes made)

. gen G_TP1=0

. replace G_TP1=G_T[_n+1] if facility_id==facility_id[_n+1]&(year+1==year[_n+1])
(470 real changes made)

. 
. set seed 99164

. fuzzydid d_fine_rate22  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  3959 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID |  3119.471   10458.06    .298284   .7654864  -18677.03   23978.51 
        W_TC |  8589.232   14096.37   .6093224   .5423108  -24538.85    33681.3 
       W_CIC |  25350.59   35996.23   .7042569   .4812728   -301.573   132321.5 

. 
. set seed 99164

. fuzzydid d_insp_rate22  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  3959 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID | -.4446007   1.096624  -.4054267   .6851639  -2.560022   1.891548 
        W_TC | -3.524087    2.26026  -1.559151   .1189606  -7.245382   1.603179 
       W_CIC | -5.702464   2.923983  -1.950238   .0511477   -11.0876  -.0387827 

. 
. set seed 99164

. fuzzydid d_fine_rate22  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(state_number)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: state_number.  Number of observations:  3959 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID |  3119.471   7343.384   .4248002   .6709823  -11319.24    16252.4 
        W_TC |  8589.232   10937.31   .7853149    .432269  -12026.79   31340.99 
       W_CIC |  25350.59   23519.89   1.077836   .2811069   1196.224   87998.46 

. 
. set seed 99164

. fuzzydid d_insp_rate22  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(state_number)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: state_number.  Number of observations:  3959 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID | -.4446007   1.502853  -.2958379   .7673539  -3.546615   2.382262 
        W_TC | -3.524087   2.794161  -1.261233   .2072249  -8.365474   2.886259 
       W_CIC | -5.702464   3.939279  -1.447591   .1477315   -15.4763   .9253595 

. 
. set seed 99164

. fuzzydid d_state_fine_rate22  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  3959 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID |  8808.151   8368.267   1.052566   .2925401  -8713.325   24787.14 
        W_TC |  11246.11    11146.4   1.008945   .3130008  -9994.816   31907.09 
       W_CIC |  10061.13   9079.763   1.108083    .267826  -6181.035   27761.04 

. 
. set seed 99164

. fuzzydid d_state_insp_rate22  G_T G_TP1 year d_treatXpost2, did tc cic newcateg(0 0.25 0.5  0.75  1) breps(200) cluster(facility_id)
(running estim_wrapper on estimation sample)

Bootstrap replications (200)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200

Estimator(s) of the local average treatment effect with bootstrapped standard errors.  Cluster variable: facility_id.  Number of observations:  3959 .

             |      LATE    Std_Err          t    p_value   lower_ic   upper_ic 
-------------+------------------------------------------------------------------
       W_DID | -.3586363   1.102752  -.3252192   .7450152  -2.587858   2.157527 
        W_TC | -2.926789   2.199436    -1.3307   .1832879  -6.882959   1.663116 
       W_CIC | -4.765119   2.908222  -1.638499   .1013177  -10.29392   .4769312 

. 
. log close
      name:  <unnamed>
       log:  /Users/wesleyblundell/Dropbox/Wes_Supplemental_NEI/JAERE_Replication/Replication_package/log/Table_5_6_A12_A13.log
  log type:  text
 closed on:  17 May 2024, 08:13:31
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
